﻿using PlayerScannerCore.ViewModel;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace PlayerScanner
{
    public class PlayerViewScopeConverter : IValueConverter
    {
      
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var ret = 0;

            if (value != null)
                ret = (int)(PlayerViewScope)value;

            return ret;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var ret = PlayerViewScope.Inventory;

            if (value != null)
                ret = (PlayerViewScope)(int)value;

            return ret;
        }
    }
}
